*/
class SpecialEditWatchlist extends UnlistedSpecialPage {
/**
- * Editing modes
+ * Editing modes. EDIT_CLEAR is no longer used; the "Clear" link scared people
+ * too much. Now it's passed on to the raw editor, from which it's very easy to clear.
*/
const EDIT_CLEAR = 1;
const EDIT_RAW = 2;
$mode = self::getMode( $this->getRequest(), $mode );
switch ( $mode ) {
- case self::EDIT_CLEAR:
- // The "Clear" link scared people too much.
- // Pass on to the raw editor, from which it's very easy to clear.
-
case self::EDIT_RAW:
$out->setPageTitle( $this->msg( 'watchlistedit-raw-title' ) );
$form = $this->getRawForm();
switch ( $mode ) {
case 'clear':
case self::EDIT_CLEAR:
- return self::EDIT_CLEAR;
case 'raw':
case self::EDIT_RAW:
return self::EDIT_RAW;
$mode = SpecialEditWatchlist::getMode( $request, $par );
if ( $mode !== false ) {
- # TODO: localise?
- switch ( $mode ) {
- case SpecialEditWatchlist::EDIT_CLEAR:
- $mode = 'clear';
- break;
- case SpecialEditWatchlist::EDIT_RAW:
- $mode = 'raw';
- break;
- default:
- $mode = null;
+ if ( $mode === SpecialEditWatchlist::EDIT_RAW ) {
+ $title = SpecialPage::getTitleFor( 'EditWatchlist', 'raw' );
+ } else {
+ $title = SpecialPage::getTitleFor( 'EditWatchlist' );
}
- $title = SpecialPage::getTitleFor( 'EditWatchlist', $mode );
+
$output->redirect( $title->getLocalURL() );
return;
}